<?php

echo "<form name=\"report_constraint_selection\" method=\"post\" action=\"$PHP_SELF\">";

$db->query="SELECT colour_id,colour_desc||'-'||colour_id as colour_desc from $master_colour_table order by colour_desc";
$db->runQuery();
$colour_array=$db->returnArrays();
$display_array[0]["Colour"]=
	$form->generateSelectMenu("colour_id[]",$_REQUEST["colour_id"],$colour_array,"All","3",true,"","","","Select Colour");

$db->query="SELECT product_id,product_desc||'-'||product_id as product_desc from $master_product_table order by product_desc";
$db->runQuery();
$product_array=$db->returnArrays();
$display_array[0]["Article"]=
	$form->generateSelectMenu("product_id[]",$_REQUEST["product_id"],$product_array,"All","3",true);



$db->query=generateSelectQuery($master_animal_table,"","","animal_name");
$db->runQuery();
$animal_array=$db->returnArrays();
$display_array[0]["Animal"]=
	$form->generateSelectMenu("animal_id[]",$_REQUEST["animal_id"],$animal_array,"All","3",true,"","");

$db->query="select r.partner_id, mm.company_name from $relationships_table r, $member_product_details_table mpd, $master_member_table mm where r.product_details_id=mpd.product_details_id and mpd.activity_id in ('buy','jwb','prd') and mm.member_id=r.partner_id order by mm.company_name";
$db->runQuery();
$buyer_array=$db->returnArrays();
$display_array[0]["Buyer"]=
	$form->generateSelectMenu("customer_id[]",$_REQUEST["customer_id"],$buyer_array,"All","3",true);





$date_event="onFocus=\"document.report_constraint_selection.period.options[0].selected=true\"";
$link="<a href=\"javascript:show_calendar('report_constraint_selection.from_date');\" onmouseover=\"window.status='Date Picker';return true;\" onmouseout=\"window.status='';return true;\"><img src=\"".$page->header_path."date_picker/calendar.gif\" width=\"16\" height=\"16\" border=\"0\"></a>";

$display_array[0]["From Date"]=
	$form->generateInputTag("text",array("name"=>"from_date","value"=>"$from_date","size"=>"10","maxlength"=>"12","title"=>"dd/mm/yyyy","value"=>date("01/m/Y")),$date_event,$link);

$link="<a href=\"javascript:show_calendar('report_constraint_selection.to_date');\" onmouseover=\"window.status='Date Picker';return true;\" onmouseout=\"window.status='';return true;\"><img src=\"".$page->header_path."date_picker/calendar.gif\" width=\"16\" height=\"16\" border=\"0\"></a>";

$display_array[0]["To Date"]=
	$form->generateInputTag("text",array("name"=>"to_date","value"=>"$to_date","size"=>"10","maxlength"=>"12","title"=>"dd/mm/yyyy","value"=>date("d/m/Y")),$date_event,$link);

doHorizontalTable($display_array,"90%","",$report_customization["column_style"],true,true,false,"");

//doHorizontalTable($display_date_array,"40%","",$report_customization["column_style"],true,true,false,"");

?>
